package com.wu.company.service;

import com.wu.company.entity.Utigradetask;
import com.wu.company.entity.UtigradetaskId;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * created by wuyanshen on 2017/12/25 22:33
 */
public interface UtiGradeTaskRepository extends JpaRepository<Utigradetask,UtigradetaskId> {
    List<Utigradetask> findById_GradeCode(String gradecode);
    @Query("select distinct t.id.taskCode from Utiusergradetask g,Utigradetask t where g.id.gradeCode=t.id.gradeCode and t.id.taskCode like ? and g.id.userCode=?")
    List<String> findTaskCode (String taskCode,String userCode);
}
